﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Elysium.Controls;
using Elysium.Demo.Configuracion.Empresa;
using SIIE_ERP.View;
using SIIE_ERP.Codigo;

namespace Elysium.Demo.CRM
{
    /// <summary>
    /// Lógica de interacción para Menu_Configuracion.xaml
    /// </summary>
    public partial class Menu_CRM : UserControl
    {
        private UsuarioActivo _sesion;

        public Menu_CRM(ref UsuarioActivo usuario)
        {
            InitializeComponent();
            this._sesion = usuario;
        }

        private void Expander_Catalogos_Expanded(object sender, RoutedEventArgs e)
        {
            if (Expander_Transacciones != null)
                Expander_Transacciones.IsExpanded = false;          
        }

        private void Expander_Transacciones_Expanded(object sender, RoutedEventArgs e)
        {
            if (Expander_Catalogos != null)
                Expander_Catalogos.IsExpanded = false;
        }

        private void ButtonProspecto_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewCRM.Content = new Catalogos.Prospecto_Consulta(ref _sesion);
        }

        private void ButtonCampana_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewCRM.Content = new Catalogos.Campanas_Consulta(ref _sesion);
        }

        private void ButtonTipoDeActividad_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewCRM.Content = new Catalogos.TipoActividad_Consulta(ref _sesion);
        }

        private void ButtonCompetidor_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewCRM.Content = new Catalogos.Competidor_Consulta(ref _sesion);
        }

        private void ButtonActividades_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewCRM.Content = new Transacciones.Actividad_Consulta(ref _sesion);
        }

        private void ButtonOportunidades_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewCRM.Content = new Transacciones.Oportunidad_Consulta(ref _sesion);
        }

       
    }
}
